/**
 * 
 */
package scene;

import gui.box.OptionBox;

import input.InputManager;

import java.util.ArrayList;

import audio.AudioManager;

import main.Config;
import main.Core;
import model.ImageSprite;
import data.Vector2;

/**
 * 
 * @author YvensDesktop
 *
 */
public class TitleScene extends BaseScene{

	public TitleScene(Core core) {
		super(core);
		ImageSprite background = new ImageSprite(String.valueOf(Config.getConfig("titleScreenPath")), Vector2.zero(), new Vector2(1024, 768), this, core);
		background.setDepth(0f);
		
		ArrayList<String> texts = new ArrayList<String>();
		texts.add("Start");
		texts.add("Load");
		texts.add("Config");
		texts.add("Exit");
		
		new OptionBox(texts, null, 30, new Vector2(397, 393), background, core);
		//AudioManager.playMidi("sounds/temaInicio.mid", true);
	}
	
	@Override
	public void update(float elapsedTime){
		super.update(elapsedTime);
		
		if(InputManager.keyboard.getConfirm().wasPressed()) {
			AudioManager.playWav("sounds/confirmar.wav");
		} else if(InputManager.keyboard.getCancel().wasPressed()) {
			AudioManager.playWav("sounds/cancelar.wav");
		}
	}
}
